package com.rc.saas.tenant.service.transfer;

import com.rc.saas.tenant.base.BaseService;
import com.rc.saas.tenant.dto.TransPayWalletInfoDto;
import com.rc.saas.tenant.dto.TransPayWalletResultDto;
import com.rc.saas.tenant.mapper.tenant.TenantEnterpriseMenuMapper;
import com.rc.saas.tenant.mapper.transfer.TransferOrderMapper;
import com.rc.saas.tenant.model.order.OrderInfo;
import com.rc.saas.tenant.model.tenant.TenantEnterpriseMenu;
import com.rc.saas.tenant.model.tenant.TenantEnterpriseMenuExample;
import com.rc.saas.tenant.model.transfer.TransferOrder;
import com.rc.saas.tenant.model.transfer.TransferOrderExample;

/**
 * Created by Sven on 2021/08/11
 */
public interface TransferOrderService extends BaseService<Long, TransferOrder, TransferOrderExample, TransferOrderMapper> {
    void insertSelectiveReturnId(TransferOrder transferOrder);

    /**
     * 转帐成功后更新订单信息
     * @param transferOrderId
     */
    void updateSuccessTransferOrder(Long transferOrderId, TransPayWalletResultDto transPayWalletResult, TransPayWalletInfoDto transPayWalletInfo);

    /**
     * 转帐失败后更新订单信息
     * @param transferOrderId
     */
    void updateFailTransferOrder(Long transferOrderId, String retryTransfersReq, String retryGettransferinfoReq, TransPayWalletResultDto transPayWalletResult);

    /**
     * 统计付款失败的订单
     * @param memberId
     * @return
     */
    long countFailTransferOrderByMember(Long memberId);

    TransferOrder selectTransferOrderByOutTradeNo(String tenantCode, String outTradeNo);

    TransferOrder selectByRefundApplyId(Long refundApplyId);
}
